<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <script src="./Cesium/Cesium.js"></script>
  <link rel="stylesheet" href="./Cesium/Widgets/widgets.css" />
  <style>
    html,
    body {
      padding: 0px;
      margin: 0px;
    }
  </style>
</head>

<body>
  <div id="cesiumContainer"></div>
  <script>
    // 加载地图 失败了
    const esri = new Cesium.ArcGisMapServerImageryProvider({
      url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
    })  // 设置一个变量用于存储新地图的信息
    Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0MzJiNzYwNC1lNjNkLTQxNTctOGRmMi1hYWI0YzdmNzU5NjciLCJpZCI6MTIwMjYwLCJpYXQiOjE2NzI4MjE1NTZ9.92plPvDAcuXNNGm2-NsbEMdODDP9bYVnmlNsAtUsD8g";
    const viewer = new Cesium.Viewer("cesiumContainer", {
      baseLayerPicker: false, //  隐藏默认的地图按钮，否则会影响新地图的加载
      imageryProvider: esri,  //  设置地图
    });
      // 加载夜晚的地球
    //   const layer = viewer.imageryLayers.addImageryProvider(
    //     new Cesium.IonImageryProvider({ assetId: 3812 })
    //   );

  </script>
</body>

</html>